package IO流;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class IO流_6_缓冲字节流_输入 {
    public static void main(String[] args) {
IO流_6_缓冲字节流_输入 dx = new IO流_6_缓冲字节流_输入();
dx.test();
    }

    void test(){
        /**
         * 缓冲字节输入流
         */
        try {
            //设置 文件字节流对象
            FileInputStream in = new FileInputStream("F:\\java_IO\\io3.txt");

            //缓冲字节输入流
            BufferedInputStream br =  new BufferedInputStream(in);

            byte[]  b = new  byte[100];

            br.read(b); //打开

            System.out.println(new String(b));

            br.close();
            in.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
